﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using KDG.Sys;

namespace KDG.FoldersSize.Scaner
{
    public class ScanerItemString : ScannerItem
    {
        private IFormatProvider _fileSizeFormatProvider = new FileSizeFormatProvider();
        public static string FileSizeFormat = "{0}";

        public ScanerItemString(ref ScannerItem ScanerItem)
        {
            this.Childs = ScanerItem.Childs;
            this.FilesCount = ScanerItem.FilesCount;
            this.FoldersCount = ScanerItem.FoldersCount;
            this.FullName = ScanerItem.FullName;
            this.IsDirectory = ScanerItem.IsDirectory;
            this.Length = ScanerItem.Length;
            this.Name = ScanerItem.Name;
            this.Progress = ScanerItem.Progress;
            this.ProgressTotal = ScanerItem.ProgressTotal;
        }

        public string LengthString { get { return string.Format(_fileSizeFormatProvider, FileSizeFormat, this.Length); } }
    }
}
